import React from 'react';

const FileList = ({ files, onFileClick, onDirectoryClick }) => {
  return (
    <div className="file-list">
      {files.map(file => (
        <div key={file.name} className={`file-item ${file.type}`}>
          {file.type === 'directory' ? (
            <span onClick={() => onDirectoryClick(file.name)}>
              📁 {file.name}